package com.xingkeduo.utils;


import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Collection;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageUserResponseDTO<T> {
    //总页数
    private long pageTotal;
    //总条数
    private long recordTotal;

    private String message;

    private Collection<T> dtoLists = new ArrayList<>();

    private Collection<T> labelLists = new ArrayList<>();

    public PageUserResponseDTO(IPage page,  Collection<T> dtoLists,  Collection<T> labelLists) {
        this.pageTotal = page.getPages();
        this.recordTotal = page.getTotal();
        this.dtoLists = dtoLists;
        this.labelLists = labelLists;
    }
}
